<?include_once('template.php');?>

<html>
<?
	$draftRepo = new DraftRepo();
	$draft = $draftRepo->get($_SESSION['team']->draftID);
	$teamRepo = new TeamRepo();
	$teamOnClock = $teamRepo->getPickingTeam($draft);
	echo getHeader();
?>

<body>
	<?echo getToolbar($draft, $ie, 1);?>
	<div class="container-fluid">
		<?echo getNavBar($draft);?>
		<div class="content">
			<?echo getClockMessage($teamOnClock);?>
			<div class="position">
				<span>Filter:</span>
				<span><input type="radio" name="position" value="all" />ALL</span>
				<span><input type="radio" name="position" value="qb" />QB</span>
				<span><input type="radio" name="position" value="rb" />RB</span>
				<span><input type="radio" name="position" value="wr" />WR</span>
				<span><input type="radio" name="position" value="te" />TE</span>
				<span><input type="radio" name="position" value="k" />K</span>
				<span><input type="radio" name="position" value="def" />DEF</span>
			</div>
			<table id='fa' class='fa player zebra-striped <?if ($ie){echo "ie";}?>'>
				<thead>  
					<tr>  
						<th scope="col" class="col1">RNK</th>
						<th scope="col" class="col2">&nbsp</th>
						<th scope="col" class="col3">NAME</th>
						<th scope="col" class="col4">POS</th>
						<th scope="col" class="col5">BYE</th>
					</tr>  
				</thead>
				<tbody>
					<?
						$playerRepo = new PlayerRepo();
						$players = $playerRepo->getAllFreeAgentsInDraft($draft->id);
						foreach ($players as $p)
						{
							echo $p->getDisplayFormat(false);
						}
					?>
				</tbody>
			</table>
		</div>
	</div>
	<script type="text/javascript" src="helper.js"></script>
	<script type="text/javascript" src="poll.js"></script>
	<script type="text/javascript" src="selectionwarning.js"></script>

</body>
</html>
